<?php

/**
 * Created by JetBrains PhpStorm.
 * User: Đặng Khánh Trung
 * Date: 11/1/12
 * Time: 8:58 PM
 * To change this template use File | Settings | File Templates.
 */
// No direct access to this file
defined('_JEXEC') or die('Restricted access');

// import Joomla modelitem library
jimport('joomla.application.component.modelitem');

/**
 * Cauhinhs Model
 */
class VastModelCauhinhs extends JModelItem {

    public function getNumOfItemsPerPage()
    {
        $db = JFactory::getDBO();
        $query = $db->getQuery(true);

        $query->select('a.*');
        $query->from('#__cauhinh AS a');
        $query->where('a.ten = ' . $db->quote('numOfItemsPerPage'));

        $db->setQuery($query);
        $tmp = $db->loadObject();
        
        return $tmp->giatri;        
    }
}